<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Page
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: manage.tpl 2010-08-31 17:53 idris $
 * @author     Idris
 */
?>

<?php echo $this->render('_pageMainNavigation.tpl'); ?>

<div class='layout_middle'>    
  <div class="page_list_items">
  <?php if (count($this->paginator) == 0): ?>
  	<div class="tip"><span><?php echo $this->translate("There is no pages"); ?>, <?php echo $this->htmlLink($this->url(array(), 'page_create'), $this->translate('create page')); ?>.</span></div>
  <?php endif; ?>
     <?php foreach( $this->paginator as $page ): ?>
       <div class="page_list_item <?php if ($page->featured) echo "page_list_item_featured"; ?>">
         <table width="100%">
           <tbody>
           	<tr valign="top">
       				<td>
       					<div class="page_list_title"><a href="<?php echo $page->getHref(); ?>"><?php echo $page->title; ?></a></div>      					
       					<div class="page_list_desc"><?php echo $page->getDescription(true); ?></div>
       					<div class="page_list_submitted">Submitted by 
       						<a href="<?php echo $page->owner->getHref(); ?>"><?php echo $page->owner->getTitle(); ?></a>, updated 
       						<?php echo $this->timestamp($page->modified_date); ?> | <?php echo $page->getTotalViewsCount(); ?> views
       					</div>
       					<div class="page_options">
       						<?php echo $this->htmlLink($this->url(array('action' => 'edit', 'page_id' => $page->getIdentity()), 'page_team'), $this->translate("Edit"), array("class" => "page_edit buttonlink")); ?>
       						<?php echo $this->htmlLink($this->url(array('action' => 'delete', 'page_id' => $page->getIdentity()), 'page_team'), $this->translate("Delete"), array("class" => "page_delete buttonlink")); ?>
          			</div>
             	</td>
             	<td width="180" align="right">
             		<?php if ($page->featured) : ?> <div class="page_item_featured">Sponsored</div><div class="clr"></div> <?php endif; ?>            		
             		<?php echo $this->htmlLink($page->getHref(), $this->itemPhoto($page, 'thumb.profile', '', array('width' => 175))); ?>
             	</td>
             </tr>
           </tbody>
         </table>
       </div>
     <?php endforeach; ?>
   <?php if( $this->paginator->count() > 1 ): ?>
     <?php echo $this->paginationControl($this->paginator); ?>
   <?php endif; ?>
   </div>
</div>